package com.archie.xunji.MakeView;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.ImageView;

/**
 * Created by Archie on 2015/11/10.
 */
public class CircleImageView extends ImageView {

    private Paint paint;

    public CircleImageView(Context context) {
        super(context);

        initData();
    }

    public CircleImageView(Context context, AttributeSet attrs) {
        super(context);


        initData();
    }

    private void initData() {

        paint = new Paint();

        paint.setColor(Color.parseColor("#FFFFFF"));

    }

    @Override
    protected void onDraw(Canvas canvas) {

        canvas.drawCircle(0, 0, 20f, paint);

    }
}
